<script type="text/javascript">
    {literal}   
    $(document).ready(function () {        
        
    });
    function doSearch() {
    	if (!validateBeforeSearch()) {
        	return false;
    	}
    	var searchAction = "{/literal}{$searchAction}{literal}";
    	var filterData = $("#filterForm").serialize();
    	$.ajax({
            type:       "POST",
            url:        "../" + searchAction + "/SearchAjax?set_ajax_view",
            data:       filterData,      
            dataType:   "json",
            beforeSend: function() {
    	    $("div#searchResult").html('');
    		},
            success:    function(data) {

            if (data.error.code ==  'OK') {
                $("div#searchResult").html(data.result);                 
               
            } else {
                displayError(data.error.mess);              
            }

        }
        }); 
    }
    //this function will be overrided in derive module
    function validateBeforeSearch() {
        return true;
    }
    {/literal}        
</script>
<div id="SearchPage">
<div  class="form_container" style="float: none;">
    <form id="filterForm" action="">    
    <div id="searchFilter" style="width: 100%; float: none;">{$searchFilter}</div>
    </form>
    <div style="text-align: right;"><a class="imgBtn" id="searchBtn"
	onclick="doSearch()"><img src="../images/search.png"
	title="{translate}Search{/translate}" /></a>
	</div>	
</div>
<div id="searchResult" style='margin-top: 10px; float: none;width: 100%;'></div>
</div>
